package com.androidwwf.jwr;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class WidgetBrowserActivity extends Activity implements OnClickListener{

	EditText url;
	WebView browser;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.widgetbrowser);
		
		browser = (WebView) findViewById(R.id.wvBrowser);
		
		browser.getSettings().setJavaScriptEnabled(true);
		browser.getSettings().setLoadWithOverviewMode(true);
		browser.getSettings().setUseWideViewPort(true);
		
		browser.setWebViewClient(new Client());
		try{
			browser.loadUrl("http://m.wnf.nl/50manieren/");
		}catch (Exception e){
			e.printStackTrace();
		}
	}

	public void onClick(View v) {
		// TODO Auto-generated method stub
			String theWebsite = url.getText().toString();
			browser.loadUrl(theWebsite);
	}
}
